#ifndef __spi_H
#define __spi_H
#ifdef __cplusplus
 extern "C" {
#endif

#include "gd32f4xx.h"
#include "main.h"


#define SPI_HandleTypeDef uint32_t

//extern SPI_HandleTypeDef hspi2;


extern void _Error_Handler(char *, int);

void MX_SPI2_Init(void);

void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef hspi);
void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef hspi);

#ifdef __cplusplus
}
#endif
#endif /*__ spi_H */
